/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.backlog.dao;

import br.com.backlog.dao.content_management.ProductDAO;
import br.com.backlog.dao.content_management.ProjectDAO;
import br.com.backlog.dao.content_management.ReportDAO;
import br.com.backlog.dao.content_management.SprintDAO;
import br.com.backlog.dao.content_management.TaskDAO;
import br.com.backlog.dao.content_management.UserDAO;

/**
 *
 * @author Gleibson Oliveira
 */
public abstract class DAOFactory {

	@SuppressWarnings("unchecked")
    public static final Class HIBERNATE = br.com.backlog.dao.hibernate.HibernateDAOFactory.class;

    @SuppressWarnings("unchecked")
    public static DAOFactory instance(Class factory) {
        try {
            return (DAOFactory)factory.newInstance();
        } catch (Exception ex) {
            throw new RuntimeException("Couldn't create DAOFactory: " + factory);
        }
    }


    public abstract ProductDAO getProductDAO();
    public abstract ProjectDAO getProjectDAO();
    public abstract ReportDAO getReportDAO();
    public abstract SprintDAO getSprintDAO();
    public abstract TaskDAO getTaskDAO();
    public abstract UserDAO getUserDAO();
    
}
